Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Enables Cluster Admins (even without an account in the cluster) to access administrative approval flows for group-related requests, addressing issue #601 where Cluster Admins could approve account requests but not group/create-group requests.
Changes:
- Update
usePermissionsto allow Cluster Admins to manage/view groups within the current cluster route. - Update
RequireAupAgreementto avoid blocking Cluster Admins (and to scope FinancialAdmin checks to the current cluster). - Add test fixtures and a new UI test covering Cluster Admin access without an account.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| Hippo.Web/ClientApp/src/test/mockData.ts | Adds a ClusterAdmin app context fixture with no accounts for tests. |
| Hippo.Web/ClientApp/src/Shared/usePermissions.ts | Grants Cluster Admins manage/view permissions for groups in the current cluster. |
| Hippo.Web/ClientApp/src/Shared/RequireAupAgreement.tsx | Bypasses AUP gate for Cluster Admins; scopes FinancialAdmin permission checks to the current cluster. |
| Hippo.Web/ClientApp/src/components/Account/Requests.test.tsx | Adds a test ensuring Cluster Admins without an account can access the approvals UI. |
Comments suppressed due to low confidence (1)
Hippo.Web/ClientApp/src/Shared/RequireAupAgreement.tsx:88
- The comment above this return says "cluster doesn't have an AUP, so no verification necessary", but the condition now also bypasses AUP verification for System/Cluster admins even when the cluster does have an AUP. Please update the comment to reflect the actual reason(s) for bypassing the AUP gate here (or split the condition so the comment remains accurate).
if (
hasSystemPermission ||
hasClusterAdminPermission ||
!cluster.acceptableUsePolicyUrl ||
!cluster.acceptableUsePolicyUpdatedOn
) {
// cluster doesn't have an AUP, so no verification necessary
return <>{children}</>;
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
jSylvestre
reviewed
Apr 6, 2026
| const canManageGroup = (groupName: string) => { | ||
| if (isSystemAdmin) return true; | ||
| if (!clusterName) return false; | ||
| if (isSystemAdmin || isClusterAdmin) return true; |
Member
There was a problem hiding this comment.
Is there anything the system admin allows that we don't want a cluster admin to do?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #601